package com.googlecode.flair.editors
{
	import mx.containers.Accordion;
	import mx.containers.ApplicationControlBar;
	import mx.containers.Box;
	import mx.containers.Canvas;
	import mx.containers.ControlBar;
	import mx.containers.DividedBox;
	import mx.containers.Form;
	import mx.containers.FormHeading;
	import mx.containers.FormItem;
	import mx.containers.Grid;
	import mx.containers.HBox;
	import mx.containers.HDividedBox;
	import mx.containers.Panel;
	import mx.containers.TabNavigator;
	import mx.containers.Tile;
	import mx.containers.TitleWindow;
	import mx.containers.VBox;
	import mx.containers.VDividedBox;
	import mx.containers.ViewStack;
	import mx.controls.Button;
	import mx.controls.ButtonBar;
	import mx.controls.CheckBox;
	import mx.controls.ColorPicker;
	import mx.controls.ComboBox;
	import mx.controls.DataGrid;
	import mx.controls.DateChooser;
	import mx.controls.DateField;
	import mx.controls.HRule;
	import mx.controls.HScrollBar;
	import mx.controls.HSlider;
	import mx.controls.HorizontalList;
	import mx.controls.Image;
	import mx.controls.Label;
	import mx.controls.LinkBar;
	import mx.controls.LinkButton;
	import mx.controls.List;
	import mx.controls.Menu;
	import mx.controls.MenuBar;
	import mx.controls.NumericStepper;
	import mx.controls.ProgressBar;
	import mx.controls.RadioButton;
	import mx.controls.RadioButtonGroup;
	import mx.controls.RichTextEditor;
	import mx.controls.SWFLoader;
	import mx.controls.Spacer;
	import mx.controls.TabBar;
	import mx.controls.Text;
	import mx.controls.TextArea;
	import mx.controls.TextInput;
	import mx.controls.TileList;
	import mx.controls.Tree;
	import mx.controls.VRule;
	import mx.controls.VScrollBar;
	import mx.controls.VSlider;
	import mx.controls.VideoDisplay;
	
	public class ComponentIcons
	{
		
		public static var instance : ComponentIcons = new ComponentIcons();
		public function ComponentIcons()
		{
			if (instance) {
				throw new Error("This is a singleton.");
			}
		}
		
		[Bindable]
		[Embed(source="/assets/components/Accordion.png")]
		public var AccordionIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ApplicationControlBar.png")]
		public var ApplicationControlBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Box.png")]
		public var BoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Button.png")]
		public var ButtonIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ButtonBar.png")]
		public var ButtonBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Canvas.png")]
		public var CanvasIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/CheckBox.png")]
		public var CheckBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ColorPicker.png")]
		public var ColorPickerIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ComboBox.png")]
		public var ComboBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ControlBar.png")]
		public var ControlBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/DataGrid.png")]
		public var DataGridIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/DateChooser.png")]
		public var DateChooserIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/DateField.png")]
		public var DateFieldIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/DividedBox.png")]
		public var DividedBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Form.png")]
		public var FormIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/FormHeading.png")]
		public var FormHeadingIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/FormItem.png")]
		public var FormItemIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Grid.png")]
		public var GridIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/HBox.png")]
		public var HBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/HDividedBox.png")]
		public var HDividedBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/HorizontalList.png")]
		public var HorizontalListIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/HRule.png")]
		public var HRuleIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/HScrollBar.png")]
		public var HScrollBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/HSlider.png")]
		public var HSliderIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Image.png")]
		public var ImageIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Label.png")]
		public var LabelIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/LinkBar.png")]
		public var LinkBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/LinkButton.png")]
		public var LinkButtonIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/List.png")]
		public var ListIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Menu.png")]
		public var MenuIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/MenuBar.png")]
		public var MenuBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/NumericStepper.png")]
		public var NumericStepperIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Panel.png")]
		public var PanelIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ProgressBar.png")]
		public var ProgressBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/RadioButton.png")]
		public var RadioButtonIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/RadioButtonGroup.png")]
		public var RadioButtonGroupIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/RichTextEditor.png")]
		public var RichTextEditorIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Spacer.png")]
		public var SpacerIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/SWFLoader.png")]
		public var SWFLoaderIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/TabBar.png")]
		public var TabBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/TabNavigator.png")]
		public var TabNavigatorIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Text.png")]
		public var TextIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/TextArea.png")]
		public var TextAreaIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/TextInput.png")]
		public var TextInputIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Tile.png")]
		public var TileIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/TileList.png")]
		public var TileListIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/TitleWindow.png")]
		public var TitleWindowIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/Tree.png")]
		public var TreeIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/VBox.png")]
		public var VBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/VDividedBox.png")]
		public var VDividedBoxIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/VideoDisplay.png")]
		public var VideoDisplayIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/ViewStack.png")]
		public var ViewStackIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/VRule.png")]
		public var VRuleIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/VScrollBar.png")]
		public var VScrollBarIcon : Class;
		
		[Bindable]
		[Embed(source="/assets/components/VSlider.png")]
		public var VSliderIcon : Class;

		public function getIcon(component : Class) : Class
		{
			switch (component) {
				case Accordion : return AccordionIcon;
				case ApplicationControlBar : return ApplicationControlBarIcon;
				case Box : return BoxIcon;
				case Button : return ButtonIcon;
				case ButtonBar : return ButtonBarIcon;
				case Canvas : return CanvasIcon;
				case CheckBox : return CheckBoxIcon;
				//case ColorPicker : return ColorPickerIcon;
				case ComboBox : return ComboBoxIcon;
				case ControlBar : return ControlBarIcon;
				case DataGrid : return DataGridIcon;
				case DateChooser : return DateChooserIcon;
				case DateField : return DateFieldIcon;
				case DividedBox : return DividedBoxIcon;
				case Form : return FormIcon;
				case FormHeading : return FormHeadingIcon;
				case FormItem : return FormItemIcon;
				case Grid : return GridIcon;
				case HBox : return HBoxIcon;
				case HDividedBox : return HDividedBoxIcon;
				case HorizontalList : return HorizontalListIcon;
				case HRule : return HRuleIcon;
				case HScrollBar : return HScrollBarIcon;
				case HSlider : return HSliderIcon;
				case Image : return ImageIcon;
				case Label : return LabelIcon;
				case LinkBar : return LinkBarIcon;
				case LinkButton : return LinkButtonIcon;
				case List : return ListIcon;
				case Menu : return MenuIcon;
				case MenuBar : return MenuBarIcon;
				case NumericStepper : return NumericStepperIcon;
				case Panel : return PanelIcon;
				case ProgressBar : return ProgressBarIcon;
				case RadioButton : return RadioButtonIcon;
				case RadioButtonGroup : return RadioButtonGroupIcon;
				case RichTextEditor : return RichTextEditorIcon;
				case Spacer : return SpacerIcon;
				case SWFLoader : return SWFLoaderIcon;
				case TabBar : return TabBarIcon;
				case TabNavigator : return TabNavigatorIcon;
				case Text : return TextIcon;
				case TextArea : return TextAreaIcon;
				case TextInput : return TextInputIcon;
				case Tile : return TileIcon;
				case TileList : return TileListIcon;
				case TitleWindow : return TitleWindowIcon;
				case Tree : return TreeIcon;
				case VBox : return VBoxIcon;
				case VDividedBox : return VDividedBoxIcon;
				case VideoDisplay : return VideoDisplayIcon;
				case ViewStack : return ViewStackIcon;
				case VRule : return VRuleIcon;
				case VScrollBar : return VScrollBarIcon;
				case VSlider : return VSliderIcon;
			} 
			return null;
		}
		
	}
}